cd /root

ls Python-3.11.6.tgz || wget https://mirrors.huaweicloud.com/python/3.11.6/Python-3.11.6.tgz --no-check-certificate
tar -xvf Python-3.11.6.tgz
cd /root/Python-3.11.6
./configure --prefix=/usr/local/python3.11.6 --enable-loadable-sqlite-extensions --enable-shared --with-openssl=/usr/local/openssl11/
cd /root/Python-3.11.6&&make -j120
cd /root/Python-3.11.6&&make install


cat <<EOF >/usr/local/ascendrc_python3.11.6.sh
export PATH=/usr/local/python3.11.6/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/python3.11.6/lib:$LD_LIBRARY_PATH
EOF

source /usr/local/ascendrc_python3.11.6.sh
pip3 install --upgrade pip
python3 --version
pip3 show pip
